package org.jeecg.modules.demo.baseorderservicewriteoff.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.baseorderservicewriteoff.entity.BaseOrderServiceWriteoff;
import org.jeecg.modules.demo.baseorderservicewriteoff.mapper.BaseOrderServiceWriteoffMapper;
import org.jeecg.modules.demo.baseorderservicewriteoff.service.IBaseOrderServiceWriteoffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * @Description: 订单待核销服务表
 * @Author: jeecg-boot
 * @Date: 2022-02-11
 * @Version: V1.0
 */
@Service
public class BaseOrderServiceWriteoffServiceImpl extends ServiceImpl<BaseOrderServiceWriteoffMapper, BaseOrderServiceWriteoff> implements IBaseOrderServiceWriteoffService {
    @Autowired
    private BaseOrderServiceWriteoffMapper baseOrderServiceWriteoffMapper;

    // 根据订单id查询
    @Override
    public IPage<BaseOrderServiceWriteoff> getByOderId(Page<BaseOrderServiceWriteoff> page, String orderId) {
        return baseOrderServiceWriteoffMapper.getByOderId(page, orderId);
    }

//次卡项目统计
    @Override
    public List<HashMap> getServiceCount(BaseOrderServiceWriteoff baseOrderServiceWriteoff) {
        return baseOrderServiceWriteoffMapper.getServiceCount(baseOrderServiceWriteoff);
    }

}
